package com.qdlc.p2p.dal.model;

import org.springframework.beans.BeanUtils;

import com.qdlc.p2p.common.util.Page;
import com.qdlc.p2p.dal.dto.Customer;
/**
 * 
 * 客服 model
 * @author yy
 * @version 1.0
 */
public class CustomerModel extends Customer {
	
	/** 当前页码 */
	private int page = 1;

	/** 每页数据条数 */
	private int rows = Page.ROWS;
	
	/** 快速查询条件*/
	private String searchName;
	
	/**
	 * 显示
	 */
	public static final int ENABLE = 0;
	
	/**
	 * 不显示
	 */
	public static final int DISABLE = 1;
	
	/**
	 * 删除
	 */
	public static final int ISDELETE = 1;
	
	/**
	 * 未删除
	 */
	public static final int NOTDELETE = 0;
	
	/**
	 * 
	 * customer对象 拷贝到 customerModel对象中
	 * @param customer
	 * @return
	 */
	public static CustomerModel instance(Customer customer){
		CustomerModel customerModel = new CustomerModel();
		BeanUtils.copyProperties(customer, customerModel);
		return customerModel;
	}
	
	/**
	 * customerModel对象 拷贝到 customer对象中
	 * @return
	 */
	public Customer prototype(){
		Customer customer = new Customer();
		BeanUtils.copyProperties(this, customer);
		return customer;
	}
	

	public int getPage() {
		return page;
	}

	public void setPage(int page) {
		this.page = page;
	}

	public int getRows() {
		return rows;
	}

	public void setRows(int rows) {
		this.rows = rows;
	}

	public String getSearchName() {
		return searchName;
	}

	public void setSearchName(String searchName) {
		this.searchName = searchName;
	}
	
	
	
}
